package edu.uni.dormitory.mapper;

import edu.uni.dormitory.bean.AccomodateApply;
import edu.uni.dormitory.bean.AccomodateApplyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * @author 郑伟森
 * @create 2019.05.01
 * @function 映射
 */
public interface AccomodateApplyMapper {
    int countByExample(AccomodateApplyExample example);

    int deleteByExample(AccomodateApplyExample example);

    int deleteByPrimaryKey(Long id);

    int insert(AccomodateApply record);

    int insertSelective(AccomodateApply record);

    List<AccomodateApply> selectByExample(AccomodateApplyExample example);

    AccomodateApply selectByPrimaryKey(@Param("id")Long id);

    int updateByExampleSelective(@Param("record") AccomodateApply record, @Param("example") AccomodateApplyExample example);

    int updateByExample(@Param("record") AccomodateApply record, @Param("example") AccomodateApplyExample example);

    int updateByPrimaryKeySelective(AccomodateApply record);

    int updateByPrimaryKey(AccomodateApply record);
//todo 未分页
    List<AccomodateApply> selectAccommodatePageByApplyPerson(@Param("bywho") Long bywho);

    List<AccomodateApply> selectAccommodatePageByCollege(@Param("collegeId") Long collegeId);

    List<AccomodateApply> selectAccommodatePageByArea(@Param("areaId") String areaId);

    AccomodateApply selectSameCollegeById(@Param("id") Long id, @Param("collegeId")Long collegeId);
}